package com.toivan.mt.model;

import java.util.Iterator;
import java.util.List;

public class MtMaskManager {

    private List<MtMask> masks;

    public List<MtMask> getMasks() {
        return masks;
    }

    public void setMasks(List<MtMask> masks) {
        this.masks = masks;
    }

    MtMask findMask(String name) {
        Iterator iterator = this.masks.iterator();
        MtMask mask;
        do {
            if (!iterator.hasNext()) {
                return null;
            }
        } while(!name.equals((mask = (MtMask) iterator.next()).getName()));

        return mask;
    }
}
